//读入10个整数存入数组，找出其中最大值和最小值

#include <stdio.h>
int main()
{
	int i,j,max,min;
	int d[10];
	for (i = 0;i < 10;i++)
		scanf("%d",&d[i]);
	max = d[0];
	min = d[0];
	for (j = 1;j < 10;j++)
	{
		if (d[j] > max)
			max = d[j];
		if (d[j] < min)
			min = d[j];
	}
	printf("max=%d,min=%d\n",max,min);

	return 0 ;
}

//diwutiantang@diwutiantang-VirtualBox:~/snap/lc/1217$ ./1
//2 3 4 5 6 1 2 -5 3 9 1 
//max=9,min=-5
//diwutiantang@diwutiantang-VirtualBox:~/snap/lc/1217$ ./1
//2 -4 3 2 1 -5 13 15 6 9
//max=15,min=-5

